翻訳と辞書
Words near each other
・ Top Ten Professional Women
・ Top Third Ventures
・ Top Thrill Dragster
・ Top Tier Detergent Gasoline
・ Top Topham
・ Top Totty
・ Top Town
・ Top tree
・ Top Trumps
・ Top Trumps (TV series)
・ Top Trumps Adventures
・ Top Trumps Adventures (Wii)
・ Top Trumps Books
・ Top TV (Indonesia)
・ Top TV Papua
Top type
・ Top Up TV
・ Top Up TV Promotional Channel
・ Top Valley
・ Top Valley Academy
・ Top Ville
・ Top Withens
・ Top, Azerbaijan
・ Top, bottom and versatile
・ Top, bottom, switch (BDSM)
・ Top, Oghuz
・ Top, Zangilan
・ Top-coded
・ Top-down (disambiguation)
・ Top-down and bottom-up design


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Top type : ウィキペディア英語版
Top type

The top type in the type theory of mathematics, logic, and computer science, commonly abbreviated as top or by the ''down tack'' symbol (⊤), is the ''universal'' type, sometimes called the ''universal supertype'' as all other types in any given type system are subtypes of top. In most cases it is the type which contains every possible object in the type system of interest. It is in contrast with the bottom type, or the ''universal subtype'', which every other type is supertype of and in most cases it is the type that contains no members at all.
==Support in programming languages==

Several typed programming languages provide explicit support for the top type.
Note that in statically-typed languages, there are two different, often confused, concepts when discussing the top type.
# A "universal base class" or other item at the top of a runtime ''class hierarchy'' (often relevant in object-oriented programming) or ''type hierarchy''; it is often possible to create objects with this actual (runtime) type, or it could be found when one examines the type hierarchy programmatically, in languages that support it
# A (compile-time) ''static type'' in the code whose variables can be assigned any value (or a subset thereof, like any object pointer value), similar to dynamic typing
The first concept often implies the second, i.e. if a universal base class exists, then a variable that can point to an object of this class can also point to an object of any class. However, several languages have types in the second regard above (e.g. void
*
in C++, id in Objective-C, interface
The following object-oriented languages do not have a universal base class:
* C++. The "pointer to void" type can accept any non-function pointer, even though the void type itself is not the universal type but the bottom type.
* Objective-C. It is possible to create a new base class by not specifying a parent class for a class, although this is highly unusual. Object is conventionally used as the base class in the original Objective-C runtimes. In the OpenStep and Cocoa Objective-C libraries, NSObject is conventionally the universal base class. The top type for pointers to objects is id.
* Swift. It is possible to create a new base class by not specifying a parent class for a class. The protocol Any can accept any type.
* PHP.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Top type」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.